<template>
	<view class="page">
		<view class="flex benben-position-layout flex flex-wrap align-center my_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub my_fd0_0'>
				<view class='flex flex-wrap align-center my_fd0_0_c0'>
				</view>
				<view style="font-size: 36rpx;color: #fff;font-weight: 500;">
					<text>我的</text>
				</view>
				<view class='flex flex-wrap align-center my_fd0_0_c1'>
					<!-- <view class='flex flex-wrap align-center my_fd0_0_c1_c0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/news/news`">
						<image class='my_fd0_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"57.png"'></image>
					</view> -->
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<!---flex布局flex布局开始-->
		<view class="flex benben-flex-layout flex-wrap align-center my_flex_1" v-if="isLogin" @tap.stop="handleJumpDiy"
			data-type="navigateTo" :data-url="`/pages/my/personalInformation/personalInformation`">
			<image class='my_fd1_0' mode="aspectFill" :src='user.head_img'></image>
			<view  style="flex: 1;">
				<view class="flex justify-between">
					<text class="my_fd1_1_c0">{{user.user_nickname}}</text>
					<image @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/news/news`" style="width: 42rpx;height: 42rpx;" :src='STATIC_URL+"92.png"' mode="aspectFill"></image>
				</view>
				
				<view class="my_fd1_1_c1" v-if="user.user_type == 1 && isLogin">
					<image mode="aspectFit" :src='STATIC_URL+"82.png"'></image>
				</view>
			</view>
		</view>
		<view class="flex benben-flex-layout flex-wrap align-center my_flex_1" v-else @tap.stop="handleJumpDiy"
			data-type="navigateTo" :data-url="`/pages/tabBar/login/login`">
			<image class='my_fd1_0' mode="aspectFill" :src='STATIC_URL+"49.png"'></image>
			<view  style="flex: 1;">
				<view class="flex justify-between">
					<text class="my_fd1_1_c0">请登录</text>
					<image @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/news/news`" style="width: 42rpx;height: 42rpx;" :src='STATIC_URL+"92.png"' mode="aspectFill"></image>
				</view>
			</view>
		</view>
		<!---flex布局flex布局结束-->
		<!---flex布局flex布局开始-->
		<view class="flex flex-wrap align-center justify-between benben-flex-layout my_flex_2">
			<!-- <view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/skimmingChapter/skimmingChapter?type=1`">
				<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"41.png"'></image>
				<text class='my_fd2_0_c1'>刷题记录</text>
			</view>
			<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/examinationRecords/examinationRecords?type=2`">
				<image class='my_fd2_1_c0' mode="aspectFit" :src='STATIC_URL+"42.png"'></image>
				<text class='my_fd2_1_c1'>考试记录</text>
			</view>
			<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/examinationRecords/examinationRecords?type=3`">
				<image class='my_fd2_2_c0' mode="aspectFit" :src='STATIC_URL+"43.png"'></image>
				<text class='my_fd2_2_c1'>测试记录</text>
			</view> -->
			<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/myInformation/index`">
				<image class='my_fd2_0_c0' mode="aspectFit" :src='STATIC_URL+"41.png"'></image>
				<text class='my_fd2_0_c1'>我的资料</text>
			</view>
			<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/index/myCollection/myCollection`">
				<image class='my_fd2_1_c0' mode="aspectFit" :src='STATIC_URL+"42.png"'></image>
				<text class='my_fd2_1_c1'>我的收藏</text>
			</view>
			<view v-if="audit_status == 1" class='flex flex-direction flex-wrap align-center' @tap.stop="popupShow1673862116532=true">
				<image class='my_fd2_2_c0' mode="aspectFit" :src='STATIC_URL+"43.png"'></image>
				<text class='my_fd2_2_c1'>收货地址</text>
			</view>
		</view>
		<template v-if="userInfo.id != 130">
			<view class="member_info" v-if="user.user_type != 1 && isLogin">
				<image @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/my/becomeStudent/index`" :src='STATIC_URL+"12.png"' mode="aspectFill"></image>
			</view>
			<view class="member_info" v-if="user.user_type == 1 && isLogin">
				<image :src='STATIC_URL+"111.png"' mode="aspectFill"></image>
			</view>
		</template>
		

		<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_3">
			<!-- <view class='flex flex-wrap align-center my_fd3_0' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/download/download`">
				<image class='my_fd3_0_c0' mode="aspectFit" style="width: 34rpx;height: 36rpx;" :src='STATIC_URL+"86.png"'></image>
				<text class='my_fd3_0_c1'>资料下载</text>
				<text class='fu-iconfont2  my_fd3_0_c2'>&#xe7f2;</text>
			</view> -->
			<view class='flex flex-wrap align-center my_fd3_0' @tap.stop="popupShow1673862116533=true">
				<image class='my_fd3_0_c0' mode="aspectFit" style="width: 34rpx;height: 36rpx;" :src='STATIC_URL+"86.png"'></image>
				<text class='my_fd3_0_c1'>在线咨询</text>
				<text class='fu-iconfont2  my_fd3_0_c2'>&#xe7f2;</text>
			</view>
			<view class='flex flex-wrap align-center my_fd3_0' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/feedback/feedback`">
				<image class='my_fd3_0_c0' mode="aspectFit" :src='STATIC_URL+"44.png"'></image>
				<text class='my_fd3_0_c1'>意见反馈</text>
				<text class='fu-iconfont2  my_fd3_0_c2'>&#xe7f2;</text>
			</view>
			<view class='flex flex-wrap align-center my_fd3_1' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/aboutUs/aboutUs`">
				<image class='my_fd3_1_c0' mode="aspectFit" :src='STATIC_URL+"45.png"'></image>
				<text class='my_fd3_1_c1'>关于我们</text>
				<text class='fu-iconfont2  my_fd3_1_c2'>&#xe7f2;</text>
			</view>
			<!-- <view class='flex flex-wrap align-center my_fd3_2' @tap.stop="getcache()">
				<image class='my_fd3_2_c0' mode="aspectFit" :src='STATIC_URL+"46.png"'></image>
				<text class='my_fd3_2_c1'>清除缓存</text>
				<text class='my_fd3_2_c2'>{{appRubbishCacheSize}}</text>
				<text class='fu-iconfont2  my_fd3_2_c3'>&#xe7f2;</text>
			</view>
			<view class='flex flex-wrap align-center my_fd3_3' @tap.stop="getedition()">
				<image class='my_fd3_3_c0' mode="aspectFit" :src='STATIC_URL+"47.png"'></image>
				<text class='my_fd3_3_c1'>版本更新</text>
				<text class='my_fd3_3_c2'>{{appVersion}}</text>
				<text class='fu-iconfont2  my_fd3_3_c3'>&#xe7f2;</text>
			</view> -->
			<view class='flex flex-wrap align-center my_fd3_4' @tap.stop="handleJumpDiy" data-type="navigateTo"
				:data-url="`/pages/my/set/set`">
				<image class='my_fd3_4_c0' mode="aspectFit" :src='STATIC_URL+"48.png"'></image>
				<text class='my_fd3_4_c1'>设置</text>
				<text class='fu-iconfont2  my_fd3_4_c2'>&#xe7f2;</text>
			</view>
		</view>
		
		
		<benben-popup v-model="popupShow1673862116532" :mask="true" :mask-close-able="true" mode='center'>
			<view class="flex flex-direction flex-wrap align-center benben-flex-layout" @tap.stop="popupShow1673862116532=false">
				<view class='flex flex-direction flex-wrap align-center Withdrawals_fd2_0'>
					
					<view class="popup_text">功能维护中，请耐心等待</view>
				</view>
				<!-- <image class='Withdrawals_fd2_1' mode="aspectFit" :src='STATIC_URL+"313.png"'
					@tap.stop="popupShow1673862116532=false"></image> -->
			</view>
		</benben-popup>
		
		<benben-popup v-model="popupShow1673862116533" :mask="true" :mask-close-able="true" mode='bottom' border-radius="16">
			<view class="customer">
				<view class="customer_1" @tap="getgiveMobile">
					<view class="customer_1_1">平台联系电话</view>
					<view class="customer_1_2">(点击拨打电话)</view>
				</view>
				<button class="customer_2" open-type="contact">在线客服</button>
				<view class="customer_3"></view>
				<view class="customer_4" @tap.stop="popupShow1673862116533=false">取消</view>
			</view>
		</benben-popup>

	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},

		data() {
			return {
				"popupShow1673862116532": false,
				"popupShow1673862116533": false,  // 联系客服弹窗
				"user": {
					"invite_code": "",
					"address": "",
					"address_code": "",
					"address_citycode": "",
					"id": "",
					"lastid": "",
					"user_nickname": "",
					"mobile": "",
					"user_name": "",
					"head_img": "",
					"birthday": "",
					"is_finger": "",
					"user_money": "",
					"freeze_money": "",
					"withdrawal_money": "",
					"score": "",
					"empirical": "",
					"invoice_title": "",
					"invoice_company_title": "",
					"total_consumption_money": "",
					"sex": "",
					"create_time": "",
					"phone": "",
					"online": "",
					"_mobile": "",
					"coupon": "",
					"age": "",
					"collection_count": "",
					"browse_count": "",
					"certified": "",
					"invite": []
				},
				"system": "",
				"isLogin": false,
				"audit_status": 0
			};
		},
		computed: {
			userInfo: {
				get() {
					return this.$store.state.userInfo
				},
				set() {
					this.$store.commit('updateUserInfo', value)
				},
			}
		},
		watch: {
			popupShow1673862116533() {
				if (this.popupShow1673862116533) {
					uni.hideTabBar();
				} else {
					uni.showTabBar();
				}
			}
		},
		onLoad(options) {
			this.getgetSystem();
			this.getHide();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			// this.$store.dispatch('getAppVersion') // 更新版本号
			// this.$store.dispatch('getAppCache') // 更新缓存大小
			if (global.token) {
				this.isLogin = true;
				this.getuser();
			}
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 上架隐藏状态  post65bcc633c5008
			getHide() {
				this.$api.post(global.apiUrls.post65bcc633c5008, {
					
				}).then(res => {
					if (res.data.code == 1) {
						this.audit_status = res.data.data.audit_status;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			//版本
			getedition() {
				this.$util.debounce(
					() => {
						this.$refs.update.checkAppUpdate()
					},
					1000,
					true
				)

			},
			//缓存
			getcache() {
				this.$store.dispatch('appClearCache')
			},
			//获取个人信息
			async getuser() {
				//请求方法
				//数据验证

				let userData = await this.$api.post(global.apiUrls.post5c78c4772da97, {
					user_id: this.userInfo.id
				});
				if (userData.data.code != 1) {
					this.$message.info(userData.data.msg);
					return
				}
				let userinfo = userData.data;
				this.user = userinfo.data
				// console.log(this.user);
			},
			//获取联系客服
			async getgetSystem() {
				//请求方法
				//数据验证
				let systemData = await this.$api.post(global.apiUrls.post636385f21f818, {
					
				});
				if (systemData.data.code != 1) {
					this.$message.info(systemData.data.msg);
					return
				}
				let systeminfo = systemData.data;
				this.system = systeminfo.data;
			},
			//拨打电话
			getgiveMobile() {
				let _this = this;
				uni.makePhoneCall({
					phoneNumber: _this.system //仅为示例
				});
			}
		}
	};
</script>
<style lang="scss" scoped>
	.customer {
		width: 100%;
		height: 380rpx;
		background: #fff;
		text-align: center;
		.customer_1 {
			padding: 37rpx 0 32rpx;
			border-bottom: 1px solid #eee;
			.customer_1_1 {
				font-size: 32rpx;
				font-weight: 500;
			}
			.customer_1_2 {
				font-size: 26rpx;
				color: #999999;
				font-weight: 500;
			}
		}
		.customer_2 {
			padding: 16rpx 0;
			font-size: 32rpx;
			background: #fff;
		}
		.customer_3 {
			width: 100%;
			height: 20rpx;
			background: #f8f8f8;
		}
		.customer_4 {
			padding: 28rpx;
			font-size: 32rpx;
			color: #999999;
		}
	}
	
	
	
	
	::v-deep .Withdrawals_fd2_0_c1_c0 {
		width: 480rpx;
	}
	
	.Withdrawals_fd2_0_c1 {
		touch-action: none;
		height: 330rpx;
		width: 480rpx;
	}
	
	.Withdrawals_fd2_0_c0 {
		font-size: 36rpx;
		font-weight: 700;
		color: rgba(51, 51, 51, 1);
		margin: 0rpx 0rpx 32rpx 0rpx;
	}
	
	.Withdrawals_fd2_0 {
		background: #fff;
		width: 550rpx;
		height: 576rpx;
		background: url(https://app.ezsdcsm.com/images/93.png) no-repeat;
		background-size: 100% auto !important;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		padding: 28rpx 32rpx 45rpx 32rpx;
		margin: 0rpx 0rpx 40rpx 0rpx;
	}
	.Withdrawals_fd2_1 {
		width: 56rpx;
		height: 56rpx;
		border-radius: 28rpx 28rpx 28rpx 28rpx;
	}
	.popup_text {
		font-size: 36rpx;
		font-weight: 500;
		margin: 309rpx auto 0;
	}
	
	
	
	.member_info {
		margin: 32rpx;
		image {
			width: 100%;
			height: 190rpx;
			border-radius: 24rpx;
		}
	}
	.my_fd3_0 {
		border-bottom: 1px solid #eee;
		height: 117rpx;
	}

	.my_fd3_0_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd3_0_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.my_fd3_0_c2 {
		margin: 0rpx 0rpx 0rpx auto;
		color: rgba(191, 191, 191, 1);
		font-size: 20rpx;
	}

	.my_fd3_1 {
		border-bottom: 1px solid #eee;
		height: 117rpx;
	}

	.my_fd3_1_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd3_1_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.my_fd3_1_c2 {
		margin: 0rpx 0rpx 0rpx auto;
		color: rgba(191, 191, 191, 1);
		font-size: 20rpx;
	}

	.my_fd3_2 {
		border-bottom: 1px solid #eee;
		height: 117rpx;
	}

	.my_fd3_2_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd3_2_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.my_fd3_2_c2 {
		margin: 0rpx 0rpx 0rpx auto;
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #666666;
	}

	.my_fd3_2_c3 {
		color: rgba(191, 191, 191, 1);
		font-size: 20rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.my_fd3_3 {
		border-bottom: 1px solid #eee;
		height: 117rpx;
	}

	.my_fd3_3_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd3_3_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.my_fd3_3_c2 {
		margin: 0rpx 0rpx 0rpx auto;
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #666666;
	}

	.my_fd3_3_c3 {
		color: rgba(191, 191, 191, 1);
		font-size: 20rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.my_fd3_4 {
		border-bottom: 1px solid #eee;
		height: 117rpx;
	}

	.my_fd3_4_c0 {
		width: 40rpx;
		height: 40rpx;
		margin: 0rpx 16rpx 0rpx 0rpx;
	}

	.my_fd3_4_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.my_fd3_4_c2 {
		margin: 0rpx 0rpx 0rpx auto;
		color: rgba(191, 191, 191, 1);
		font-size: 20rpx;
	}

	.my_flex_3 {
		background: #fff;
		background-size: 100% !important;
		margin: 24rpx 32rpx 0rpx 32rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 0rpx 24rpx 0rpx 24rpx;
	}

	.my_fd2_0_c0 {
		width: 88rpx;
		height: 88rpx;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
	}

	.my_fd2_0_c1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.my_fd2_1_c0 {
		width: 88rpx;
		height: 88rpx;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
	}

	.my_fd2_1_c1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.my_fd2_2_c0 {
		width: 88rpx;
		height: 88rpx;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
	}

	.my_fd2_2_c1 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #333333;
		margin: 16rpx 0rpx 0rpx 0rpx;
	}

	.my_flex_2 {
		background: #fff;
		background-size: 100% !important;
		margin: 0rpx 32rpx 0rpx 32rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		background-size: 100% auto !important;
		padding: 40rpx 52rpx 40rpx 52rpx;
	}

	.my_fd1_0 {
		width: 156rpx;
		height: 156rpx;
		margin: -30rpx 24rpx 0rpx 0rpx;
		border-radius: 100rpx 100rpx 100rpx 100rpx;
	}

	.my_fd1_1_c0 {
		max-width: 320rpx;
		line-height: 50rpx;
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 0rpx 0rpx 12rpx 0rpx;
	}

	.my_fd1_1_c1 {
		width: 156rpx;
		height: 34rpx;
		position: relative;
		image {
			width: 100%;
			height: 100%;
		}
		// text {
		// 	position: absolute;
		// 	font-size: 24rpx;
		// 	color: #fff;
		// 	top: 0;
		// 	left: 16rpx;
		// }
	}

	.my_flex_1 {
		background: rgba(246, 247, 249, 1);
		background-size: 100% !important;
		padding: 0rpx 36rpx 0rpx 36rpx;
		background-size: 100% auto !important;
		margin: 42rpx 0rpx 30rpx 0rpx;
		border-radius: 24rpx 24rpx 16rpx 16rpx;
	}

	.my_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.my_fd0_0_c0 {
		width: 50rpx;
		height: 50rpx;
	}

	.my_fd0_0_c1 {
		width: 40rpx;
		height: 40rpx;
	}

	.my_fd0_0_c1_c0 {
		width: 50rpx;
		height: 50rpx;
	}

	.my_fd0_0_c1_c0_c0 {
		width: 42rpx;
		height: 42rpx;
	}

	.my_flex_0 {
		background: url(https://app.ezsdcsm.com/images/38.png) no-repeat, transparent;
		background-size: 100% !important;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://app.ezsdcsm.com/images/38.png) no-repeat, rgba(246, 247, 249, 1);
		background-size: 100% auto !important;
	}
</style>
